Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: OpenDoc Class Reference /
Part 1 - Classes and Methods / ODUndo


AddActionToHistory

The AddActionToHistory method pushes the action data and its associated part onto the undo stack.

void AddActionToHistory (in ODPart whichPart,
                         in ODActionData actionData, 
                         in ODActionType actionType, 
                         in ODName undoActionLabel,
                         in ODName redoActionLabel);
whichPart
A reference to the part that performed the action.
actionData
A byte array whose buffer contains the data needed by the part to allow it to undo the action.
actionType
The possible type of undo action. The value of actionType must be one of the following: kODSingleAction, kODBeginAction, or kODEndAction.
undoActionLabel
A user-visible label for the undo command beginning with the word Undo.
redoActionLabel
A user-visible label for the redo command beginning with the word Redo.
DISCUSSION
The value kODSingleAction for the actionType parameter indicates that the action was a single action. The value kODBeginAction indicates that the action was the first action of a multistep action. The value kODEndAction indicates that the action was the last action of a multistep action.

EXCEPTIONS
kODErrCannotAddAction
Cannot add the specified action to this undo object; an undo or redo action is already in progress.
kODErrOutOfMemory
There is not enough memory to allocate the action information.
SEE ALSO
The ODActionData type (page 898).
The ODActionType type (page 898).
The ODName type (page 876).
"Adding an Action to the Undo Action History" on page 259 in OpenDoc Programmer's Guide.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
17 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help